<div  class="shopadd">
	<div class="container  contents bgw">
		<div class="row">
			<div class="col-sm-8 col-sm-offset-2 stepshow">
				<div class="step">
					<div class="stepover" style="width:50%"></div>
					<div class="stepson step1 active">
						<span>1</span>
						<h5>设置基本资料</h5>
					</div>
					<div class="stepson step2 active">
						<span>2</span>
						<h5>分配店长账号</h5>
					</div>
					<div class="stepson step3">
						<span>3</span>
						<h5>完成</h5>
					</div>
				</div>
			</div>
			<form  name="staffadd_form"  ng-submit="postSend()" >
				<div class="col-md-12">
					<div class="col-sm-10 col-sm-offset-2 form-horizontal">
						<div class="form-group">
							<label class="col-sm-2 control-label" ></label>
							<div class="col-sm-6 text-red">*为必填项</div>

						</div>
						<div class="form-group">
							<label  class="col-sm-2 control-label text-right">
								<span class="text-red">*</span>
								姓名
							</label>
							<div class="col-sm-6" >
								<input type="text" class="form-control" ng-model="posts.nickname" name="nickname" placeholder="请输入店长名称" ng-minlength='2' ng-maxlength='20' ng-pattern="config.textCheckJson.nickname" required></div>
							<span class="help-block " ng-messages="staffadd_form.nickname.$error" >
								<div  ng-message="required">2-20个字符以内</div>
								<div class="text-red" ng-message="minlength">需大于2个字符</div>
								<div  class="text-red" ng-message="maxlength">需小于20字符</div>
								<div class="text-red" ng-message="pattern">
									<span  ng-bind="config.textCheckErrorJson.nickname"></span>
								</div>
							</span>
							<span class="help-block" ng-show="staffadd_form.nickname.$valid">输入正确</span>
						</div>
			
						
						<div class="form-group">
							<label  class="col-sm-2 control-label text-right">
								<span class="text-red">*</span>
								账号
							</label>
							<div class="col-sm-6" >
								<input type="text" class="form-control" ng-model="posts.name" name="name" placeholder="输入店长账号" ng-minlength='6' ng-maxlength='20' ng-pattern="config.textCheckJson.name" required></div>
							<span class="help-block " ng-messages="staffadd_form.name.$error" >
								<div  ng-message="required">以字母开头的6-20以内的字母、数字</div>
								<div class="text-red" ng-message="minlength">需大于6个字符</div>
								<div  class="text-red" ng-message="maxlength">需小于20字符</div>
								<div class="text-red" ng-message="pattern">
									<span  ng-bind="config.textCheckErrorJson.name"></span>
								</div>
							</span>
							<span class="help-block" ng-show="staffadd_form.name.$valid">输入正确</span>
						</div>
						<div class="form-group">
							<label  class="col-sm-2 control-label text-right">
								<span class="text-red">*</span>
								密码
							</label>
							<div class="col-sm-6" >
								<input type="password" class="form-control" ng-model="posts.password" name="password" placeholder="请输入密码" ng-minlength='8' ng-maxlength='20' ng-pattern="config.textCheckJson.password" required ng-change="reshpwd()"></div>
							<span class="help-block " ng-messages="staffadd_form.password.$error" >
								<div  ng-message="required">8-20字符以内，不能含有空格</div>
								<div  class="text-red" ng-message="minlength">需大于8个字符</div>
								<div  class="text-red" ng-message="maxlength">需小于20字符</div>
								<div class="text-red" ng-message="pattern">
									<span  ng-bind="config.textCheckErrorJson.password"></span>
								</div>
							</span>
							<span class="help-block" ng-show="staffadd_form.password.$valid">输入正确</span>
						</div>
						<div class="form-group">
							<label  class="col-sm-2 control-label text-right">
								<span class="text-red">*</span>
								确认密码
							</label>
							<div class="col-sm-6" >
								<input type="password" class="form-control" ng-model="repassword" name="repassword" placeholder="请输入密码" ng-minlength='8' ng-maxlength='20' ng-change="reshpwd()" required></div>
							<span class="help-block " ng-messages="staffadd_form.repassword.$error" >
								<div  ng-message="required">8-20字符以内，不能含有空格</div>
								<div  class="text-red" ng-message="minlength">需大于8个字符</div>
								<div  class="text-red" ng-message="maxlength">需小于20字符</div>
								<div class="text-red" ng-message="pattern">
									<span >密码与确认密码不一致</span>
								</div>

							</span>
							<span class="help-block" ng-show="staffadd_form.repassword.$valid&&!staffadd_form.repassword.$error.pattern">输入正确</span>
						</div>
						<div class="col-sm-10 col-sm-offset-2">
							<div class="row">
								<div class="col-sm-3">
									<a class="btn btn-default btn-block" ng-click="goto('staff/show/'+shopId)">返回</a>
								</div>
								<div class="col-sm-3 col-sm-offset-1">
									<button type="submit" ng-disabled="!staffadd_form.$valid" class="btn btn-danger btn-block">提交</button>
								</div>
							</div>
						</div>
					</div>
				</div>
			</form>
		</div>
	</div>
</div>
<script>
	$(function (){//
		$("#shoptype").popover({content:"直营店是指",trigger:"hover"});
	})
</script>